package com.ruoyi.worker.service.impl;

import com.ruoyi.worker.domain.ProfessionRank;
import com.ruoyi.worker.domain.SeniorityAwardSetting;
import com.ruoyi.worker.mapper.ProfessionRankMapper;
import com.ruoyi.worker.service.ProfessionRankService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author whj
 */
@Service
public class ProfessionRankServiceImpl implements ProfessionRankService {

    @Autowired
    private ProfessionRankMapper map;

    @Override
    public List<ProfessionRank> getProfessionRankListInfo(ProfessionRank professionRank) {
        return map.getProfessionRankListInfo(professionRank);
    }

    @Override
    public int add(ProfessionRank professionRank) {
        return map.add(professionRank);
    }

    @Override
    public int edit(ProfessionRank professionRank) {
        return map.edit(professionRank);
    }

    @Override
    public int remove(Long[] ids) {
        return map.remove(ids);
    }

    @Override
    public SeniorityAwardSetting getSeniorityAwardSettingListInfo(SeniorityAwardSetting seniorityAwardSetting) {
        return map.getSeniorityAwardSettingListInfo(seniorityAwardSetting);
    }

    @Override
    public int updateSeniorityAwardSetting(SeniorityAwardSetting seniorityAwardSetting) {
            map.deleteAll();
            return map.insertSeniorityAwardSetting(seniorityAwardSetting);
    }
}
